package com.meixiang.activity.account.login;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.RelativeLayout;

import com.meixiang.R;
import com.meixiang.activity.account.manager.ChangeLoginPasswordActivity;
import com.meixiang.activity.account.manager.LoginVerifyPhoneNumberActivity;
import com.meixiang.main.BaseActivity;
import com.meixiang.view.TitleView;

import butterknife.Bind;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * 登录密码
 *
 * @author zys
 */
public class LoginPasswordActivity extends BaseActivity {


    @Bind(R.id.title)
    TitleView title;
    @Bind(R.id.rl_old_passwords_change)
    RelativeLayout rlOldPasswordsChange;
    @Bind(R.id.rl_phone_code_change)
    RelativeLayout rlPhoneCodeChange;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        setContentView(R.layout.activity_login_password);
        ButterKnife.bind(this);
        super.onCreate(savedInstanceState);

    }

    @Override
    protected void initTitle() {
        title.setTitle(R.string.login_password);
        title.setLeftImageButton(R.mipmap.back);
        title.showLeftButton(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });


    }

    @Override
    protected void initView() {
    }

    @Override
    protected void setData() {

    }

    @OnClick({R.id.rl_old_passwords_change, R.id.rl_phone_code_change})
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.rl_old_passwords_change://原密码修改
                Intent oldPwdIntent = new Intent(LoginPasswordActivity.this, ChangeLoginPasswordActivity.class);
                startActivity(oldPwdIntent);
                break;
            case R.id.rl_phone_code_change:
                Intent phoneCodeIntent = new Intent(LoginPasswordActivity.this, LoginVerifyPhoneNumberActivity.class);
                startActivity(phoneCodeIntent);
                break;

        }
    }
}
